package sms.persistence;

import sms.model.BaseEntity;

import java.io.Serializable;
import java.util.List;
import java.util.Optional;

public interface IPersistenceDao {
    <T extends BaseEntity> List<T> list(Class<T> type) throws PersistenceException;

    <T extends BaseEntity> Optional<T> get(Class<T> type, Serializable id) throws PersistenceException;

    <T extends BaseEntity> String save(T entity) throws PersistenceException;

    <T extends BaseEntity> String delete(Class<T> type, Serializable id) throws PersistenceException;
}
